1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gio.DebugControllerT; 26 27 public import gio.c.functions; 28 public import gio.c.types; 29 30 31 /** 32 * #GDebugController is an interface to expose control of debugging features and 33 * debug output. 34 * 35 * It is implemented on Linux using #GDebugControllerDBus, which exposes a D-Bus 36 * interface to allow authenticated peers to control debug features in this 37 * process. 38 * 39 * Whether debug output is enabled is exposed as 40 * #GDebugController:debug-enabled. This controls g_log_set_debug_enabled() by 41 * default. Application code may connect to the #GObject::notify signal for it 42 * to control other parts of its debug infrastructure as necessary. 43 * 44 * If your application or service is using the default GLib log writer function, 45 * creating one of the built-in implementations of #GDebugController should be 46 * all that’s needed to dynamically enable or disable debug output. 47 * 48 * Since: 2.72 49 */ 50 public template DebugControllerT(TStruct) 51 { 52 /** Get the main Gtk struct */ 53 public GDebugController* getDebugControllerStruct(bool transferOwnership = false) 54 { 55 if (transferOwnership) 56 ownedRef = false; 57 return cast(GDebugController*)getStruct(); 58 } 59 60 61 /** 62 * Get the value of #GDebugController:debug-enabled. 63 * 64 * Returns: %TRUE if debug output should be exposed, %FALSE otherwise 65 * 66 * Since: 2.72 67 */ 68 public bool getDebugEnabled() 69 { 70 return g_debug_controller_get_debug_enabled(getDebugControllerStruct()) != 0; 71 } 72 73 /** 74 * Set the value of #GDebugController:debug-enabled. 75 * 76 * Params: 77 * debugEnabled = %TRUE if debug output should be exposed, %FALSE otherwise 78 * 79 * Since: 2.72 80 */ 81 public void setDebugEnabled(bool debugEnabled) 82 { 83 g_debug_controller_set_debug_enabled(getDebugControllerStruct(), debugEnabled); 84 } 85 }